void *datap,
GError **error)
{
+ ClutterBackend *backend = clutter_get_default_backend ();
+ CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CreateFadedIconData *data = datap;
ShellApp *app;
GdkPixbuf *pixbuf;
}
}
- texture = cogl_texture_new_from_data (width,
- height,
- COGL_TEXTURE_NONE,
- have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
- COGL_PIXEL_FORMAT_ANY,
- rowstride,
- pixels);
+ texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width, height,
+ have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
+ rowstride,
+ pixels,
+ NULL));
g_free (pixels);
g_object_unref (pixbuf);
_st_create_shadow_material (StShadow *shadow_spec,
CoglHandle src_texture)
{
+ ClutterBackend *backend = clutter_get_default_backend ();
+ CoglContext *ctx = clutter_backend_get_cogl_context (backend);
+
static CoglHandle shadow_material_template = COGL_INVALID_HANDLE;
CoglHandle material;
&width_out, &height_out, &rowstride_out);
g_free (pixels_in);
- texture = cogl_texture_new_from_data (width_out,
- height_out,
- COGL_TEXTURE_NONE,
- COGL_PIXEL_FORMAT_A_8,
- COGL_PIXEL_FORMAT_A_8,
- rowstride_out,
- pixels_out);
+ texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width_out, height_out,
+ COGL_PIXEL_FORMAT_A_8,
+ rowstride_out,
+ pixels_out,
+ NULL));
g_free (pixels_out);
static CoglHandle
create_corner_material (StCornerSpec *corner)
{
+ ClutterBackend *backend = clutter_get_default_backend ();
+ CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CoglHandle texture;
cairo_t *cr;
cairo_surface_t *surface;
cairo_surface_destroy (surface);
- texture = cogl_texture_new_from_data (size, size,
- COGL_TEXTURE_NONE,
- CLUTTER_CAIRO_FORMAT_ARGB32,
- COGL_PIXEL_FORMAT_ANY,
- rowstride,
- data);
+ texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, size, size,
+ CLUTTER_CAIRO_FORMAT_ARGB32,
+ rowstride,
+ data,
+ NULL));
g_free (data);
g_assert (texture != COGL_INVALID_HANDLE);
float actor_width,
float actor_height)
{
+ ClutterBackend *backend = clutter_get_default_backend ();
+ CoglContext *ctx = clutter_backend_get_cogl_context (backend);
StBorderImage *border_image;
CoglHandle texture;
guint radius[4];
if (interior_path != NULL)
cairo_path_destroy (interior_path);
- texture = cogl_texture_new_from_data (width, height,
- COGL_TEXTURE_NONE,
- CLUTTER_CAIRO_FORMAT_ARGB32,
- COGL_PIXEL_FORMAT_ANY,
- rowstride,
- data);
+ texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width, height,
+ CLUTTER_CAIRO_FORMAT_ARGB32,
+ rowstride,
+ data,
+ NULL));
cairo_destroy (cr);
cairo_surface_destroy (surface);